using UnityEngine;

public class ButtonShowFPS : MonoBehaviour
{
	public GameObject ButtonEnabled;

	public GameObject ButtonDisabled;

	public void OnClickEnable()
	{
		Save.SaveBool("ShowFPS", true);
		ButtonEnabled.SetActive(true);
		ButtonDisabled.SetActive(false);
		HUDFPS.isActive = true;
	}

	public void OnClickDisabled()
	{
		Save.SaveBool("ShowFPS", false);
		ButtonEnabled.SetActive(false);
		ButtonDisabled.SetActive(true);
		HUDFPS.isActive = false;
	}

	private void OnEnable()
	{
		if (HUDFPS.isActive)
		{
			ButtonEnabled.SetActive(true);
			ButtonDisabled.SetActive(false);
		}
		else
		{
			ButtonEnabled.SetActive(false);
			ButtonDisabled.SetActive(true);
		}
	}
}
